package com.tidc.consumer8001.controller.delete;

import com.tidc.commonality.api.StudentDeleteApi;
import com.tidc.commonality.ov.UserOV;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassNmae StudentDeleteController
 * @Description TODO
 * @Author 冯涛滔
 **/
@CrossOrigin
@RestController
@RequestMapping
public class StudentDeleteController {
	@Autowired
	StudentDeleteApi studentDeleteApi;
	@ApiOperation(value = "学生删除自己创建的项目 需要要删除的项目的id")
	@RequestMapping(value = "/student/delete/work/{id}",method = RequestMethod.DELETE)
	public UserOV deleteWork(@PathVariable(value = "id")int id, String token){
		return studentDeleteApi.deleteWork(id,token);
	}

	@ApiOperation("学生删除自己项目的队员")
	@RequestMapping(value = "/student/delete/member/{teamid}/{studentid}",method = RequestMethod.DELETE)
	public UserOV deleteMember(@PathVariable(value = "teamid")int teamId, String token, @PathVariable(value = "studentid")int stduentId){
		return studentDeleteApi.deleteMember(teamId,token,stduentId);
	}
}
